package com.dingup.mock.feign.server;

import com.dingup.api.model.mock.home.SubjectNameDataMapInfo;
import com.dingup.mock.service.MockFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * Created by wancheng on 2018/11/10.
 */
@RestController()
@RequestMapping("/feign/mock")
public class MockFeignServer {

    @Autowired
    MockFeignService mockFeignService;

    @RequestMapping(value = "/get_subject_name.do", method = RequestMethod.POST)
    public Map<String, List<SubjectNameDataMapInfo>> getSubjectName(@RequestParam("type") String type) {
        return mockFeignService.getExamSubjectName(type);
    }
}
